// edtFTPnet
// 
// Copyright (C) 2004 Enterprise Distributed Technologies Ltd
// 
// www.enterprisedt.com
// 
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
// 
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
// 
// Bug fixes, suggestions and comments should posted on 
// http://www.enterprisedt.com/forums/index.php
// 
// Change Log:
// 
// $Log: FTPException.cs,v $
// Revision 1.8  2006/10/04 08:04:13  hans
// Added constructor taking inner exception.
//
// Revision 1.7  2006/06/22 12:37:51  bruceb
// restructure
//
// Revision 1.6  2006/06/19 13:00:26  bruceb
// restructured exception hierarchy
//
// Revision 1.5  2005/10/13 20:50:43  hans
// Overriding Message property to include reply-code.
//
// Revision 1.4  2004/11/05 20:00:28  bruceb
// cleaned up namespaces
//
// Revision 1.3  2004/10/29 09:41:44  bruceb
// removed /// in file header
//
//
//

using System;

namespace EnterpriseDT.Net.Ftp
{
    
	/// <summary>  
	/// FTP specific exceptions
	/// </summary>
	/// <author>      Bruce Blackshaw
	/// </author>
	/// <version>     $Revision: 1.8 $
	/// 
	/// </version>
	public class FTPException : FileTransferException
    {
		/// <summary>   
		/// Basic constructor allowing exception message to be set
		/// </summary>
		/// <param name="msg">  Message that the user will be
		/// able to retrieve
		/// </param>
		public FTPException(string msg)
            :base(msg)
		{
		}

        /// <summary>   
        /// Basic constructor allowing exception message to be set
        /// </summary>
        /// <param name="msg">Message that the user will be able to retrieve</param>
        /// <param name="innerException">Exception that caused this exception</param>
        public FTPException(string msg, Exception innerException)
            : base(msg, innerException)
        {
        }

        /// <summary>  Constructor. Permits setting of reply code
		/// 
		/// </summary>
		/// <param name="msg">       message that the user will be
		/// able to retrieve
		/// </param>
		/// <param name="replyCode"> string form of reply code
		/// </param>
		public FTPException(string msg, string replyCode)
            :base(msg, replyCode)
		{
		}

        /// <summary>  Constructor. Permits setting of reply code
        /// 
        /// </summary>
        /// <param name="msg">       message that the user will be
        /// able to retrieve
        /// </param>
        /// <param name="replyCode"> reply code
        /// </param>
        public FTPException(string msg, int replyCode)
            :base(msg, replyCode)
        {
        }
		
		/// <summary>  Constructor. Permits setting of reply code
		/// 
		/// </summary>
		/// <param name="reply">    reply object
		/// </param>
		public FTPException(FTPReply reply)
            :base(reply.ReplyText, reply.ReplyCode)
		{
		}

	}
}